/**
 * @description: Login interface parameters
 */
export interface LoginParams {
    username: string;
    password: string;
    code: string;
}

export interface RoleInfo {
    roleName: string;
    value: string;
}

/**
 * @description: Login interface return value
 */
export interface LoginResultModel {
    userId: string | number;
    token: string;
    role: RoleInfo;
}

/**
 * @description: Get user information return value
 */
export interface GetUserInfoModel {
    roles: RoleInfo[];
    // 用户id
    userId: string | number;
    // 用户名
    username: string;
    // 真实名字
    realName: string;
    // 头像
    avatar: string;
    // 介绍
    desc?: string;
    //主页
    homePath?: string;
}

export interface RegisterUserParam {
    contacts: string;
    deptId: number;
    creditCode: string;
    phone: string;
    email: string;
    realName: string; //供应商名称
    username: string;
    password: string;
    codeImg: string; // 图片验证码
    codeSms: string; //短信验证码
}

export interface UserInfoParam {
    id?: number;
    userId?: number;
    contacts?: string;
    phone?: string;
    stamp?: string;
    creditCode?: string;
    remark?: string;
    email?: string;
    nikeName?: string;
    realName?: string;
    elctSignature?: string;
    businessLicense?: string;
    publicityImg?: string;
}

export interface AuthParam {
    id: number;
    roleId?: number;
    userId: number;
    stamp: string;
    elctSignature: string;
    businessLicense: string;
}

export type RoleList = Array<{
    id: number;
    name: string;
    enName: string
}>

export interface ModifyPasswordParam  { username: string, newPassword: string, oldPassword: string }
